package com.example.factory;

/**
 * @Classname NewInstanceFactory
 * @Description TODO
 * @Date 2023/4/25 15:21
 * @Created by XiongXiong
 * @Author: X.I.O
 */
public class NewInstanceFactory {


    public static Object getObjectByClass(Class<?> cls) {
        try {
            return cls.newInstance();
        }catch (IllegalAccessException | InstantiationException e){
            e.printStackTrace();
        }
        return null;
    }

}
